# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models
from appBlog2.fields import ListField,ContextTypeRestrictedFileField

# Create your models here.

class Poem(models.Model):
	title = models.CharField('诗题',max_length=22)
	author = models.CharField('作者',max_length=22)
	content = models.TextField('内容',max_length=666)

class ListTest(models.Model):
	labels = ListField()

	def __unicode__(self):
		return '{}'.format(self.labels)

class AddPdfFileModel(models.Model):
	name = models.CharField(max_length=100)
	file = ContextTypeRestrictedFileField(content_type='application/pdf',
										  max_upload_size=5242880,
										  upload_to='pdf')
	def __unicode__(self):
		return self.name